<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { release, verify, bind } from '@/api/bot'
import { mapGetters } from 'vuex'
export default {
  name: 'App',
  computed: {
    ...mapGetters(['name'])
  },
  mounted() {
    setTimeout(() => {
      let _1
      if (this.name === '30518') _1 = 1215603022
      else _1 = 1559172136
      this.$store.commit('user/SET_BOTNUMBER', _1)
      verify().then(_res => {
        bind(_1)
      })
    }, 2000)
  },
  destroyed() { // 退出后释放机器人资源
    setTimeout(() => {
      release()
    }, 300)
  }
}
</script>
